const path = require('path');
const fs = require("fs");
const cProcess = require("child_process");
const Tools = require("../tools.js");
const git = require("./git.js");
module.exports = function (req, res) {
  const tools = Tools(req.ctoolsOpt.devToolsDir);
  const {workspace} = req.query;
  const conf = tools.getWorkspaceConf(workspace)[0];
  git.getGitStatus(conf, {gitUnStage: true});
  try {
    res.send({data: null, code: 0});
  } catch (e) {
    res.send({data: "fail", code: 1});
  }
};
